package caiziyou.com.designpattern.principle.inversion;

public class DependecyInverion {

	public static void main(String[] args) {
		Person person = new Person();
		person.receive(new Email());
	}
}

class Email{
	public String getInfo() {
		return "电子邮件信息： Email Info";
	}
}


class Person {

	public void receive(Email email) {
		System.out.println(email.getInfo());
	}
}
